import { SETINDEXDATAMUTATION } from "../mutation-types.js"

const state={
	initData1:'我是初始化数据',
	indexData:{}
}

const mutations={
	[SETINDEXDATAMUTATION](state,data){
		state.indexData=data
	}
	
}

const actions={
	async getIndexData(context){
		const res=await this._vm.myAxios('/getIndexData')
			// 触发mutations
		context.commit(SETINDEXDATAMUTATION,res);
	}
}

const getters={
	
}

export default {
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}